package com.smart.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.smart.dao.UserDao;
import com.smart.domain.User;

@Service
public class UserService {
	private UserDao userDao;

	@Autowired
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}
	public boolean hasMatchUser(String userName,String password) {
		int matchCount=userDao.getMatchCount(userName, password);
		return matchCount>0;
	}
	public User findUserByUserName(String userName) {
		return userDao.findUserByUserName(userName);
	}
	
	@Transactional
	public void loginSuccess(User user) {
		
	}
}
